home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
DEMO_VGA
/
UTILEGA1.LZH
/
COLORS.C
< prev
next >
Wrap
Text File
|
1986-02-22
|
1KB
|
49 lines
/* */
/* EGA Graphic Demonstration, Turbo Pascal 3.01A, Version 10JAN86. */
/* (C) 1986 by Kent Cedola, 2015 Meadow Lake Ct., Norfolk, VA, 23518 */
/* */
/* This program will display over a hundred different colors by using */
/* a bit color map. Only the standard palette setting are used, if */
/* changed, more colors could be produced (but not at the same time). */
/* */
#include <mcega.h>
main()
{
char buffer[640];
register x,y;
GPParms();
GPInit();
for (y = 0; y < GDMAXROW; y++)
{
for (x = 0; x < GDMAXCOL; x += 2)
{
buffer[x] = y * GDMAXPAL / GDMAXROW;
buffer[x+1] = x / 40;
};
GPMOVE(0,y);
GPWtRow(buffer,GDMAXCOL);
y++;
for (x = 0; x < GDMAXCOL; x += 2)
{
buffer[x] = x / 40;
buffer[x+1] = y * GDMAXPAL / GDMAXROW;
};
GPMove(0,y);
GPWtRow(buffer,GDMAXCOL);
};
getch();
GPTerm();
}